import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    }
  ]
})

//跨域问题解决方面
// const cors = require('cors');  
// app.use(cors({  
//     origin:['http://192.168.3.134:8089'],
//     methods:['GET','POST'],
// }));
// //跨域问题解决方面
// app.all('*',function (req, res, next) {
//   res.header('Access-Control-Allow-Origin', 'http://192.168.3.134:8089');
//   res.header('Access-Control-Allow-Headers', 'Content-Type');
//   res.header('Access-Control-Allow-Methods', 'PUT, POST, GET, DELETE, OPTIONS');
// 　next();　
// });
// // var router = express.Router();
// console.log(app,'router')
// debugger
// router.get('/', function(req, res, next) {
//   debugger
//     res.render('index', { title: 'Express' });
//   });

//   module.exports = router;

// 